<template>
  <div class="cart">
        <div class="banner">
            <div class="topbig">
                <div class="topleft">
                <van-icon name="arrow-left" @click="tui()"/>
            </div>
            <div class="topright">
              <van-icon name="star-o" />
              <van-icon name="share-o" />
              <van-icon name="ellipsis" badge="3"/>
            </div>
            </div>
        </div>

        <div class="setline"></div>
        <van-tabs v-model="active">
        <van-tab title="88元单人洗浴">
            <div class="setline1"></div>

            <div class="tcone">
            <div class="oneline">
                <van-icon name="shop-o" /><span>皇家天使·SPA</span>
            </div>
            <p class="title">单人洗浴+搓澡+盐、奶、硫磺三选一</p>
            <div class="fd">
                <div class="fdcont">
                <div><van-icon name="passed" /><span>免预约</span></div>
                <div><van-icon name="passed" /><span>随时退</span></div>
                <div><van-icon name="passed" /><span>过期自动退</span></div>
                </div>
                <div>半年销量4238</div>
                <!-- <div></div> -->
            </div>
            <p class="coloror">开通玩乐卡，本单可省5.45元</p>
            <div class="swipe">
                <van-swipe :loop="false" :width="145">
                <van-swipe-item><img src="zhangyifan/imgs/cart1.jpg" alt="" /></van-swipe-item>
                <van-swipe-item><img src="zhangyifan/imgs/cart2.jpg" alt="" /></van-swipe-item>
                <van-swipe-item><img src="zhangyifan/imgs/cart3.jpg" alt="" /></van-swipe-item>
                <van-swipe-item><img src="zhangyifan/imgs/cart4.jpg" alt="" /></van-swipe-item>
                </van-swipe>
            </div>
            <div class="specific">
                <p class="title">团购详情</p>
                <div class="page">
                <p><span>单人浴资</span><span class="tj">网友推荐TOP.5</span></p>
                <p><span>1份</span> <span>49元</span></p>
                </div>
                <div class="page">
                <p>.<span>搓背</span></p>
                <p><span>1份</span> <span>49元</span></p>
                </div>
                <div class="page">
                <p>.<span>推盐、推奶、硫磺，三选一</span></p>
                <p><span>1份</span> <span>39元</span></p>
                </div>
            </div>
            <div class="linebox"></div>
            <div class="buyknow">
                <p class="titlebuy">购买须知</p>
                <p class="buytitle">有效期：</p>
                <p class="buycontent">
                <span>2022.9.30</span>至<span>2022.10.11</span>
                </p>
                <p class="buytitle">使用事件</p>
                <p class="buycontent"><span>11:00-21:00</span></p>
                <p class="buytitle">使用规则</p>
                <p class="buycontent"><span>店内无包间</span></p>
                <p class="buycontent"><span>发票问题询问商家</span></p>
                <div class="more" @click="fun()">
                查看更多<van-icon name="arrow-down" />
                </div>
                <div class="morecontent" ref="morecontent1">
                <p class="buycontent"><span>商家提供免费wiFi</span></p>
                <p class="buycontent"><span>堂食外带均可，可免费打包</span></p>
                <p class="buycontent">
                    <span>团购用户不可同时享受商家其他优惠</span>
                </p>
                <p class="buycontent">
                    <span>酒水饮料等问题，请致电商家咨询，以商家反馈为准</span>
                </p>
                <p class="buycontent">
                    <span>如部分菜品因时令或其他不可抗因素导致无法提供.</span>
                </p>
                <p class="buycontent">
                    <span>使用优惠券购买团单，有效期以优惠券规则为准</span>
                </p>
                <p class="buycontent">
                    <span>无需预约，消费高峰期可能需要等位 价格和销量说明</span>
                </p>
                </div>
            </div>
            </div>
            <div class="linebox"></div>
            <div class="lastcontent">
            <p class="lasttitle">适用商户</p>
            <p class="lastname">皇家天使·SPA</p>
            <div class="twopart">
                <div>
                <div class="laststart">
                    <img
                    class="start"
                    src="chenkong/imgs/shopcenter/start.gif"
                    alt=""
                    />
                    <img
                    class="start"
                    src="chenkong/imgs/shopcenter/start.gif"
                    alt=""
                    />
                    <img
                    class="start"
                    src="chenkong/imgs/shopcenter/start.gif"
                    alt=""
                    />
                    <img
                    class="start"
                    src="chenkong/imgs/shopcenter/start.gif"
                    alt=""
                    />
                    <img
                    class="start"
                    src="chenkong/imgs/shopcenter/start.gif"
                    alt=""
                    />
                </div>
                <p>休息中 11：00-22：00</p>
                </div>
                <div>
                <div class="phone"><van-icon name="phone-o" /></div>
                </div>
            </div>
            <div class="adress">
                <div>
                <van-icon name="location-o" /><span
                    >碑林区信义巷与顺城南路东城段交叉口东北巷</span
                >
                </div>
                <van-icon name="arrow" />
            </div>
            </div>
        </van-tab>

        <van-tab title="149元套票">内容 2</van-tab>
        </van-tabs>
        <router-link to="/xiyubuy"><div class="button">购买</div></router-link>
        <div class="bottom"></div>
  </div>
</template>

<script>
import axios from "axios";
export default {
    methods:{
        tui(){
            this.$router.go(-1)
        },
        fun() {
            this.$nextTick(() => {
                this.$refs.morecontent1.style.display = "block";
            });
        },
    },
    data() {
    return {
      active: "",
      obj: [],
    };
  },

  created() {
    let i = this.$route.query.shopid;
    // console.log(i);
    axios.request("http://localhost:8889/zindexcom").then(({ data }) => {
      this.obj = data[i];
    });
  },
  mounted() {
    this.$nextTick(() => {
      this.$refs.morecontent1.style.display = "none";
    });
  },
  
}
</script>

<style scoped lang='scss'>
    .cart{
        width: 100%;
        .banner{
            width: 100%;
            background-color: #f4f4f4;
        }
        .topbig{
            display: flex;
            justify-content: space-between;
            width: 95%;
            height: 12.8vw;
            font-size: 6.933vw;
            font-weight:900;
            margin: 0 auto;
            line-height:12.8vw;
            i{
                margin: 1.333vw;
            }
            a{
                color: black;
            }
        }

        .setline {
    width: 100%;
    height: 0.267vw;
    background: #f7f7f7;
  }
  .setline1 {
    width: 95%;
    margin: auto;
    height: 0.267vw;
    background: #f7f7f7;
  }
  .swipe {
    position: relative;
    // width: 90%;
    margin: auto;

    img {
      width: 37.333vw;
      height: 26.667vw;
      border: 0.267vw solid #f7f7f7;
    }
  }
  .linebox {
    width: 100%;
    height: 2.133vw;
    background: #f6f6f6;
  }
  .tcone {
    width: 95%;
    margin: auto;
    // background: green;
    // width: 3.2vw;
    font-size: 3.2vw;
    .oneline {
      padding: 3.733vw 0;
    }
    .title {
      font-size: 4.267vw;
      font-weight: bold;
    }
    .fd {
      display: flex;
      justify-content: space-between;
      padding: 1.867vw 0;
      .fdcont {
        display: flex;
        span {
          padding: 0 1.333vw;
        }
      }
    }
    .coloror {
      color: #ee4636;
      padding-bottom: 3.733vw;
    }
  }
  .specific {
    padding-bottom: 4vw;
    .title {
      font-size: 4.267vw;
      font-weight: bold;
      padding: 3.733vw 0;
    }
    .page {
      display: flex;
      justify-content: space-between;
      .tj {
        font-size: 2.667vw;
        color: #ee4636;
        padding: 0.267vw;
        border: 0.267vw solid #ee4636;
        margin-left: 2.667vw;
        line-height: 5.867vw;
      }
    }
  }
  .buyknow {
    .titlebuy {
      font-size: 4.267vw;
      font-weight: bold;
      line-height: 8.533vw;
    }
    .buytitle {
      color: #d8d8d8;
    }
    .buycontent {
      padding: 0.8vw 0 1.333vw 0.8vw;
    }
    .more {
      border-top: 0.267vw solid #d8d8d8;
      height: 12.8vw;
      text-align: center;
      line-height: 12.8vw;
      color: #d8d8d8;
    }
  }
  .lastcontent {
    width: 95%;
    margin: auto;
    .lasttitle {
      font-size: 4.267vw;
      font-weight: bold;
      line-height: 8.533vw;
    }
    .lastname {
      font-size: 3.733vw;
      font-weight: bold;
      // line-height: 8.533vw;
    }
    .twopart {
      display: flex;
      justify-content: space-between;
      padding-bottom: 3.2vw;
      border-bottom: 0.267vw solid #d8d8d8;
      .phone {
        width: 17.333vw;
        border-left: 0.267vw solid #d8d8d8;
        text-align: center;
        color: #ee4636;
      }
    }
    .adress {
      display: flex;
      justify-content: space-between;
      font-size: 3.733vw;
      padding: 3.733vw 0;
    }
    .laststart {
      padding: 2.667vw 0;
      img {
        width: 3.2vw;
      }
    }
  }
  .button{
    width:48vw;
    height:12.8vw;
    background:orange;
    margin:0 auto;
    border-radius:6.667vw;
    line-height:12.8vw;
    text-align: center;
    color:white;

  }
  .bottom {
    height: 14.4vw;
  }
    }
</style>